// Help Pages
// ============================================================================

// Core
// ----------------------------------------------------------------------------

@use "sass:meta";
@use 'core/reset';
@use 'core/color';
@use 'core/typography';
@use 'core/layout';
@use 'core/icons';

// Mixins
// ----------------------------------------------------------------------------

@mixin help-icon {
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.4em;
  border-radius: 0.4em;
  background: #fff;
  text-shadow: 0 0 2px #f9f9f9, 0 0 0 #777;
  color: rgba(200, 200, 200, 0.3);
  font-size: 10px;
}

// Components
// ----------------------------------------------------------------------------

@include meta.load-css('components/masthead');

// Rules
// ----------------------------------------------------------------------------

a {
  color: color.$brand;
}

ol,
li {
  margin: 0;
  padding: 0;
}

.columns {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

.columns__col-1-2 {
  flex-shrink: 1;
  width: 45%;
}

.wrap-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 2.5em 0;
}

.wrap-columns__col {
  max-width: 21em;
  & img {
    margin: 10px;
    padding: 5px;
    border: 1px solid color.$grey-3;
    max-width: 100%;
  }
}

.styled-text {
  @include typography.styled-text;
}

.help-page {
  padding-top: 2.5em;
  padding-bottom: 2.5em;

  background: white;
  color: color.$grey-6;

  font-family: 'Lato', typography.$sans-font-family;
  font-weight: 300;
  line-height: 22px;

  @include layout.breakpoint(920px) {
    padding-right: 460px;
  }

  .masthead {
    padding: 2.5em;
    padding-top: 0;
  }
}

.help-page-content {
  margin: auto;
  padding: 0 20px;
  min-width: 480px;

  @include layout.breakpoint(1160px) {
    padding: 0 5% 0 10%;
  }

  @include layout.breakpoint(1400px) {
    padding: 0 10% 0 20%;
  }
}

.help-page-heading {
  color: color.$grey-6;
  margin-bottom: 1em;
  font-weight: 400;
  font-size: 1.1em;
}

.help-page-lede {
  font-style: italic;
  margin-bottom: 2.5em;
}

.help-page-section {
  padding: 2.5em;
  border-top: 1px solid #eaeaea;

  &:first-child {
    border-top: none;
    padding-top: 0;
  }
}

.help-page-sidebar {
  position: fixed;
  top: 20px;
  right: 2.5em;
  bottom: 20px;
  width: 380px;
  display: block;

  @include layout.breakpoint(920px) {
    border: color.$grey-3 dotted 2px;
    border-radius: 3px;
  }
}

#help-1 {
  position: fixed;
  top: 60px;
  right: 60px;
  width: 210px;
  color: color.$grey-4;
  text-align: right;

  @include icons.icons {
    @include help-icon;
    font-size: 14px;
  }
}

#help-2 {
  background: image-url('images/help-arrow.svg') 0 0 no-repeat;
  width: 60px;
  height: 45px;
  position: absolute;
  top: -10px;
  right: -10px;
}

.numbered-list {
  width: 100%;
  counter-reset: numbered-list;
}

.numbered-list-item {
  position: relative;
  counter-increment: numbered-list;
  padding-left: 3em;
  padding-top: 0.5em;
  margin-bottom: 1.75em;
  list-style-type: none;

  &:before {
    box-sizing: content-box;
    content: counter(numbered-list);
    display: block;
    position: absolute;
    top: 0.125em;
    left: 0;
    width: 2.125em;
    height: 1.8125em;
    border: 0.125em solid color.$brand;
    border-radius: 50%;
    text-align: center;
    padding-top: 0.3125em; // 24px == Line height of text.
  }
}

.feature {
  margin-bottom: 1.5em;
}

.feature-heading {
  color: color.$grey-6;
  font-size: 1em;
  font-weight: 400;
  margin-bottom: 0.555em;
}

.feature-icon {
  font-size: 0.875em;
  margin-right: 0.3em;
}

.help-icon {
  @include help-icon;
}

.bookmarklet {
  white-space: nowrap;
  color: color.$grey-6;
  padding: 2px 4px;
  border: 1px solid;
  border-radius: 2px;
  font-size: 13px;
  cursor: move;

  @include icons.icons {
    font-size: 12px;
  }
}

/*
  Mobile layout
*/

@media screen and (max-width: 30em) {
  .help-page-sidebar {
    display: none;
  }
}
